

// 在 routes 数组中定义与主页相关操作的路由记录
const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    components: {
        'header': () => import('../components/HeaderView.vue') ,
        'default': () => {
            console.log( '= = = 异步路由组件 = = =' );
            return import('../components/HomeView.vue');
        },
        'footer': () => import('../components/FooterView.vue') ,
    },
    meta: {
      title: '主页'
    }
  },
  {
    path: '/about',
    components: {
        'header': () => import('../components/HeaderView.vue') ,
        'default': () => import('../components/AboutView.vue') ,
        'footer': () => import('../components/FooterView.vue') ,
    },
    meta: {
      title: '关于'
    }
  }
];

// 导出 路由记录 数组
export default routes ;